/**
 * Created by Administrator on 17.8.4.
 */

var page = require('webpage').create();

page.settings.userAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36";

page.onResourceRequested = function (request) {
    // delete request.headers;
    // console.log('Request ' + JSON.stringify(request, undefined, 4));
};

page.onResourceReceived = function (response) {
    delete response.headers;
    if (response.contentType.indexOf("image/") > -1) {
        console.log(response.url);
    }
};

var url = "https://www.pinterest.com/zhaogo/%E6%B5%B7%E6%8A%A5/";

page.open(url);